import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Creater with IntelliJ IDEA.
 * Description:
 * User: 86152
 * Dae: 2022-07-31
 * Time: 23:30
 */
public class demo4 {
    public static void main(String[] args) {
        ExecutorService pool1 = Executors.newFixedThreadPool(10);//创建十个线程的线程池
        ExecutorService pool2 = Executors.newCachedThreadPool();//动态增长的线程池
        ExecutorService pool3 = Executors.newSingleThreadExecutor();//单个线程的线程池
        ExecutorService pool4 = Executors.newScheduledThreadPool(1);
        Thread t1 = new Thread() {
            public void run() {
                System.out.println(1);
            }
        };
        pool4.submit(t1,1000);
    }
}
